package Shape;

import java.util.Scanner;
//封装-->保证安全性;模块化
public class CircleTest {
    public static void main(String[] args) {
        //创建对象-->
        Circle c = new Circle();
        System.out.println("请输入半径：");
        Scanner sc = new Scanner(System.in);
        c.setR(sc.nextDouble());
        //调用对象方法-->getArea()、getPerimeter()
        c.getArea();
        c.getPerimeter();

    }
}
